delete unused functions and add comment