Updated to serialize into json