changed c to ctx