basic workflow, some corrections and simplifications