Defining a controller