changed json format to pull from database