Splitting function into smaller chunks
Splitting function into smaller chunks