refactored plane class and tests