Update setGridWidth

re-factored the method to use less characters, shortened the length of the function.