added a condition to handle controller syntax