A new algorithm for tracking humans in surveillance videos is introduced in this paper. The human head and foot point are first identified by using color and shape based human detection algorithm. These annotations are taken as input for the proposed tracking algorithm. The number of past pixels taken for modelling the present pixel in Gaussian Mixture Model (GMM) is modified in this algorithm. The Weighted Running Window (WRW) is used in choosing the past pixels. The number of past pixels is limited and also more weightages is given to the immediate past pixel, thereby reducing the time taken for tracking. Different tracking parameters are used for comparing the proposed algorithm with other existing algorithm. Performance results show that the proposed algorithm is out performing when compared with the other existing algorithms for human tracking. Performance Evaluation of Tracking and Surveillance (PETS) 2009 View 1 dataset is taken for conducting the experiment.