updated from lecture
update from 2013 class