group similar variables together