Updated for trash non-modern browsers