calls generate method in generate route