fix external api functionality