making progress on the jQueryand fixing repetiton bug