updating demo to new variational syntax