added external extensions and fixed some errors