First upload of working code 1.6.2