implementing sortable grid
making adjustments for speed