added a function to divide a number into specific parts.