minor changes
creating / liberating semaphores