Rotary Encoder and Stepper motor

I perfer to use the rotary encoder since it can turn in both directions without problem and so I think it's easier to handle for my application.

It is not a problem if I can't control the stepper motor smoothly, I just want to avoid to have the motor to move contonously even when I'm not moving the encoder.
I think this happens because the step() function continues to read the previous ecnoder value..