split some code to .inherited for direct calling the sub classes

fix #11