with completed json methods, not confirmed to be correct yet (will see if it works with the json schemata)