implement timer method