updated the disconnect call to use header parameters