copy in main source file from ad-hoc development