external api + bug fixes