Added substring generation