method merged and implemented browser compatibility