refactor generators fix routes problem