using then instead of flatMap, because JS sucks and ParserResult isn't really monadic because it would be ugly