Added back timer function which mistakenly deleted