Add logic for timer