write head correctly