[feature] adds write method