working for stub events