https://medium.com/better-programming/advanced-asynchronous-operations-using-generics-in-swift-b55932a15f6a