added shared preferences for host and port