added unit tests for custom fields
fixed missing implementation of