adding ryan's changes
merging (ha ha, just overwriting) some conflicts