implement proper slice range