add locals support