added proper json encoding for client models