Use addEventListener instead overwriting readystatechange event