fixed up to use attributes