writing object example