added document event listeners