add extend extendSubClass 2 common util function