add a method parameter instead of using a private field