Updated example for multiple ports