some improvements with jquery 2