removed unnecessary conversion to int[] array