Updated to use JQuery