Added Format number to specific number of decimal places and added function to main code