converted component loader to promises