Implement slice method.