Added code to check if user is on 8.1 or not
Reflects changes made in code