Updated update, added delete

Delete check corner case first and last index