add rspec and some tests