moved comments from header to inside function semInit