setting up slice with array