main.js refactored
jumping to section
created separate function