add slice, improve last and first