ryan's update

ryan's updated code