seems to work ... but feeling that a deadlock is near