Did it in C