add method write with one param