simpler, safer script