finished code for scroll animate