better version: initialized sema./mutex