add some tests, fix action formulator
add some tests, finish fixing action formulator