to be able to return json if required