refactor to reduce complexity