Added in promise chain to deal with asynchronous DB call