added some extra comments (still confised with synchronization...