more compact way of checking motor state