changed alternative 2  based on the changes made to alternative1 for timer