Added substring generator