removing useless function and fix test