added figure and code