Added legacy API code