changed demos to use instances as parameters to enhance readability