cleaned up ruby code