add documentation
inc state if klass is a method