Adding buildToEither function