use private atrribute instead of local variable