setting up ports as resources