Defined a few foreign funcs