removed calls to element generation to factory