changed getport to readport