added demo and small code changes