woopsy, need to ensure that .resolve() is invoked as a function