add run code action refactoring