add uniform way to run code