determine port locations