Added in another parameter to keep certain element types by names