optimize double printing