Add function removeByType