added remove method and get index method in DataModel