new file with conditions
bug fix and code factoring
code factoring
augment env with declations moved here