updated jquery functions