Redefine structure to use promises