avoiding double printing