updated printing api