generalized header prologue and epilogue.