fixed the code to be compatible with the W3C validator