converted attr_accessors to instance vars to conform with actual use