Add substring functionality