currently returning 0 if the history link does not exist yet, makes function displaying table immediately work but not sure if returning 0 is an appropriate solution