Script that works, partially.