encoding all pojos