fixed calculator functionality. now works for both ways (sleep and wakeup time given)