Optimized the attendance grid