what did james buchanan do for living?