small code cleanup
should work with ie8
ie8 is ok