calc and stock in sinatra