added provided source code for cbc implementation