taking the setter creation to another function