reorganize, add more db stuff