improved Figures and code