add macro for generating commands for statefulls
add statefull