add oft used scripts to functions, remove old ones