new api refactor
merge