Add helper function for scripting