mid-refactor (BROKEN)
hacked out compilation