Madam is a CMB map-making code, designed to make temperature and polarization maps of time-ordered data of total power experiments like Planck. The algorithm is based on the destriping technique, but it also makes use of known noise properties in the form of a noise prior. The method in its early form was presented in an earlier work by Keihanen et al. (2005). In this paper we present an update of the method, extended to non-averaged data, and include polarization. In this method the baseline length is a freely adjustable parameter, and destriping can be performed at a different map resolution than that of the final maps. We show results obtained with simulated data. This study is related to Planck LFI activities.