implemented controller class with parrelisation