added json serialization to backend