added scroll detection