added scroll function to main box