Added chapter ch() functions and example code