added functions

added lastIndexOf and without