apdate script, doesn't work