completed bddop.c