add main() and more tests