Add a type for the Result struct