Replace ivar usage with method