method to replace , with digit