implement grid template