added $(document).ready() to ensure we wait for the DOM