cleaned get.cpp