first stab, completely untested.