started working on pthread sem