updated nat logic