added extra code in slice