removed checking first index of array with checking the length in logslice