moved document ready to the head tag instead of body