refactor of useless code