Creation of controller