updated main.rb- added sql stuff