Major changes made in Python algorithm
FGFS