update from shawn's live code