added expect functionality to port