added timestamp to schedule and fixed sorting