minor optimization

* replaced isArmMoving calculations with more efficient code