remove clearPort function