Zend certified PHP/Magento developer

How can I modify logic for Sort by Lowest Price?

In my Magento store in the category page I display a grid of products each product contains used and new products. All configurable products are considered new, all used simples are considered used.

When trying to sort by Lowest Price the order messes up due to some configurable products come with more than one item so while the base price might be $50 with 3 items, the displaying price will be $150. I would like the sort by order to consider the $150 for those specific configurables instead of its base price.

What file must I look into to make this happen.