refactor code to see parallax effect