wrote some ruby code