added if statment to calculate the time left to bed time