Refactored handleTakes for better readability