initial untested version complete