added first attempt at ajax onreadystatechange handling