Add support for returning values by using futures