much nicer script and stuff