changed from DOM hack to JS singleton