added code for checking mobile network (still needs testing on iOS)