updated connection to turn port string to int