added ruby code