add planes refactor