added new ruby code