refactor factorial steps, create init file