Controller result forloop changed to dynamic