new version of refactored scripts and deletion of old