Added proposed solution for c