working c soln