adding criticalsections package