changes to jQuery functions