make history api work