176/205/245: enhanced the cross-browser version