improved precise script