BZZT! All the code improvments posted about the peak finding routine have missed a FATAL ERROR! The variable peak is NEVER INITIALIZED! Your answer is quite possibly garbage... "Make it right before you make it faster" _The Elements of Programming Style_ Merlyn LeRoy