updated for IE and Chrome js issues