check empty array before seeing if k is '1'