changed scheduler to use TIM2