generates the statements in the Relation class now takes two additional parameters and is more flexible.