introduced append function and negative indices for slices