new version consistent with Rails