controller example modified