added a utility function to format float nicely