implemented public/private ports. Added XML output.