after code refactor