working with array elements in the views, should use another approach