change yes_no() and message() methods to functions and use them for buy()