changed jquery functionality