demo code following Meteor example