added optional type attributes