made ontimer code fit