initial code for CHOG