implementing some basic data structures in ruby