adds attr_reader method and removes extra puts statement