fix minor bug
remove unused function