made code more robutst but ignoring e.g. wrong order or events