replaced 'reference' method with instance variables