adding Davids code and figures