use local vars instead of privleged methods