Update script with correct find function