add slice method, see #4