moved everything into document ready