refactor, remove unnecessary code