Added object encoding