completes functionality for demo