added grid demo and revised grid generator