added database, small improvements