add bindEvents header
add logic for checking new generation