Added new function addType