use unsafe ops in ~for