update code added by gabe