refactored a complex method