using only one port and less memory