split functions into smaller one
new shiny API