copied old code into project for tracking. (Should have used a branch but I'm in a hurry dammit!)