upload of legacy code

(still work in progress)