get rid of magic numbers; make time_remaining function