added database stuff, removed pickle