This is the final program working! use the demo.