some more lenient parsing, though it still seems off