corrected syntax for returning value in ruby function.