begin of write methods + refactoring on api