hide private helper methods
add test cases for java6