adds singleton pattern with two implementations, complete rdoc and rspec