changed some db related things. tests and app are now working