Slight changes, compiled, but not tested