refactor removed code start