use proc for scope