added sort mode to get users function, and javadoc header