added code to test whether GPS is enabled