updated for webkit support