re-factor to fix display in Safari