fix minor error and remove useless method