ported Andrey's beautiful scroll to top