correctly check in & output ports