implemented the component port and buffer management logic