add "foreign" function