added safari compatability