making port asynchronous
few changes