lab 13 added port initialization