api get_next method re-fixre-fix