#53 correct write and fix indenteation