added unless() to smbuilder
fixed bug in complete_stateset