added figures and code