added function checkIfMoreThanTwentyMinutesLeft