some db stuff starting to work