implement eventqueue