better structure
use polyfill to support firefox