fixed typo
refactored and execute actions

execute actions is in an early stage, but it works