use createObject for extending classes