Added some external function support