Implementing the run method