repairing insert method to handle arrays, repairing remove method to delete from arrays