updated demos to refactor