finish common util fn: extend extendSubClass