add test and fix grid and ASCTest