refactor tutorial handlers