added init file and upgraded controller class