fully working version (pre-3rd paradigm)

the backup version before programming the firm NPV paradigm