Modification of userProgress function