doc does not need to be instance variable here