made complete_stateset virtual public so it can be overwritten
added C API and python wrapper