refactor to match app generator