controllerConnected ternary operator