remove useless code
refactor to remove useless extra function