slight changes to coherence and code structure