attempted 2-3.cpp