added ability to extend custom structure based on priority