use self closure to update attributes