My functions written in ruby