writing cheetah code