moving layout to grid