wrote code for encoder1 interrupt