further work on database