I added a function that tells if port is available