make slice return arrays correctly