preparing client