made chaos lattice based on width and height