revised bg methods for html5