using each and passing tickets off to templat