obj write functions (tested)