simplify addData
fixed regex
massive cleanup