added initial event loop