fixing promises