browser compatibility hacks, updated variable names