remove dependence on jQuery's extend