Updated to use attributes