implemented add & delete elements for jagged array