Add getAttributes() method