misc demo code for share