added slice method