create my own to_i method in ruby