replaced utils.extend with a jQuery like extend function