implementing check for 0 value in array