assign type to try and global