added DAG compression
draft version of projections based code