Added isElemOfRw function
Changed isElemOf to isElemOfGq, isElemOfZn and isElemOfRw