lib_comp takes env as first argument