change syntax to declare promises so that only requided factories need to be run