resolve scope