implement scope inheritance