When Does it Make Sense to Outsource