nematic2d modified code added