made changes based on Nico's recommendations