modified generator functions to use chained promises