restructuring cg library
[+] orietation predicate