handler preparation