changed return type of getAttributes to a vector