smooth scrollback
adding threshold for close