decorators for functions which need db connections