added a ._apply method for the db as well