implement port flag option