WIP, write test, json issues