Updated Type function