Calling foreign function works