implemented cformat
added cformat to API
implemented cprint