modified event source for easier testing