code review

this should be in some `...Database` class. So you can handle duplicate requests and stuff like that.