added scroll function and log