set private statement to protected
set private statement to protected, implement most_frequent function and fix sort function