reorganize api