Added the remaining foreign functions