ready to implement in C