(*)code refactor