Update Finding MAX and MIN value from an Array