flattening out the signing if statements