Setting variables in slots