move grid in separate class