confirmation feature of buy.cpp