fully working version, minus subtasks
removed old crap