more robust fields parsing