refactgored into real c prg
moved the driver functionality to own file
improved unstuck