tweak resolve callbacks, create resolve returnTemplate