Added printer as separate function