added a db query for the port