Using cycle for handling collections