refactored building a bit to use outcome handler to reduce repition in code