added some input constraints to the sig2str functions