updated code to work for 2 different widths