Built skeleton for write function