updated browser check
add memoization for browser check