updated code to include plotting of wl fits