changed counter to currentplane