gunna separate out the json in a bit
refactoring