grid widget implementation