demo codes and testing for learning