some test codes and demoes