Improve determine format, to handle correctly the response