Implemented base functionality in ruby