scaling and semaphores added