refactor
add action adn function.