well this is interesting
Merged Amy's work, even though Edwin is probably going to refactor more