updates to get stored procedures working
updating js too to adjust to stored procedure structure