util: add extend object method