reduce duplication of code
Included jquery