moved scripts to external file

not stable