try to refactor