watch for max rate for unit costs as well
added max cost support