compass generation
merging compass generation code