Implemented update_port