called the run function