added external3
clean code