improved parseadditionaldata function