make helping class and use it in controller