finish spec update and fix bug in type addition