registration.cpp modification