added jQuery wrapper function to make jQuery work