use variable - instead of retrieving attribute multiple times