made it working for html5