database should work now, added distinction between user view and API