normal qlearning implementation