change hard-coded labels and relation names by vars
bug fixing