New scripts

merging changes from working branch