fixed events passing
file restruct, also fixed events passing