moved scripts into a seperate file