Original code passed on from previous guy
very VERY basic implementation of price finding