separate ruby code