some hangup logic, needs testing