simplified interface, added error return value on NextStat