working on moving events syncronously instead of async