events source code