creating method for dinamic controller insertion