added functionality to handle the time finishing up