If it works well then I don't see any necessary changes to the core functionality. You should optimize that massive if else if structure. Namely, str_to_num() should only be called once. Also, you should make it such that you only need two prints where you calculate either minutes or seconds left instead of having them hardcoded.