added methods for retrieving next sequence number