[ADD] First version of refactoring api