When does it make sense to outsource and when it doesn't.