-add command "add" to add a new element in specified index
-add error checking for all function
-repair bug in append function