add subscribe to db func