updated compact representation to use ids, added main for calling c search