tested conversion in Cost class