removing duplicate sync_local_server function and adding processparameterfn to said function