prof.cpp & tests