working on some db issues