Changed signature of parse() to take in more general Result