revamp hard coded AP_PORT