Added 'not' foreign function and test