continuing plot refactoring