move getdecimalplaces method to utility