formatted gird and added spinner