small ruby code changes