refactor table into list
refactor rspec syntax on unit test