using attached for setting