getting data from the ghost db for the middleman server to use