import history code