moved sem init/destroy to main