Added some external functions