Basic program flow  (proven not to work propery)