Generalization of price checking script