move all cavs-parsing to cavs.c