removed useless write statements