tidy the code, add style for older browser