changed wait and signal arguments by adding the &