some exercise and test code