added jquery and some improvements