move NA handling elsewhere, fix all NA issue