add rspec and cleanup unit test