initial import, completely untested, does not compile yet