added ability to create json friendly model