add public api + some changes