added main contoller with methods