wrote the from c to k method