implemented cheapest determination

dynamic instead of hardcoded, depending on results