++ some changes to handle empty elements