add new prototypes for error buffer index