wrap history into procedure