changed one func from on window.load to document.ready because not necessary to be window.load