updated code and demos to match