new way of handling iteration of elements inline