auto link creation and event handling loops