preparation for other api calls and moved some method