lots of changes to EIAN script