updated attribute logic