startup with the last chap -- big refactorings