updated slice method