Working on element function, handling delimiters