finding deadlock