modified Q to fit basic RL model