add type attribute.
make sure it's error-prone.