extracted some decoration logic to setup-time