can now delete by array index and not just from the array