How to minimize resitution costs?