new subgrid solver and some fixes