changed 'createItem' to generate ANY type of element specified