have got rid of unwated functions for insertion and changed exist acccording to find_index