A simple algorithm for decoding both errors and erasures of Reed-Solomon codes