added method to check decimal places