standardize ruby code