I don't really like this approach - modifying a passed in object as a way of assembling stuff seems broken