add some demo and fixed bugs