added correct motion state monitoring