Updated getting browser version algorithm