more functionality for canvas demo