move settings creation into attached