history works properly now