correction
nicer error message
further work on new_pub