substring generator function module added