adding port getter and query code