substring generator function extra module added