set port to flag