added impl in C