fix rotation
dont reset memory
fix loop