preparing ports