modify js and add rspec