Removed extra write statements