corrected the functionality of a pattern

added one more predicate to get the state of a specific joint.