try to determinate api and pkg structure