add direction to ports, update libraries