corrected direction and deleted bool flags