trying to use html5mode - hacky changes that will need to be cleaned up