documentation updated, script simplified