This seems to be an alternate implementation of the deprecated task below.