Create common function for running instructions