Made it a bit simpler to reuse database functions