fixed up db again, working on ajax/controller logic