added code to render figure for paper