implemented and used grid layout