Use parseports function