use write instead of assignment
completed 2.2