Updated to remove attribute dependence.