wrapped everything in a document ready call