Helper functions and write support
added change size functionality