separate two type of api