refactor ability to reduce complexity