lots of changes based off Jacob's work