added document-ready to ensure proper laoding