added some lines in controller

Please merge it into EDST-28.