modified write