added rotation constraint
edited rotation stateflow.