keep js api backward compatible