better scripe code