rename port variable almost ready, still need to sort input to functions and rename global port numbers