work on database, currently broken