refactored error handling from an inout to using Result
tweaked void returning future in test