major refactoring to try to get old and new tasks working