added passing in port number and channel values as argument