Implmented index() and delete()