C version + Done v1.01