Final version for the demo

bugs are fixed