wrap signal attachment in function