Refactor to allow stubbing interactive call