check if format is correct